from flask import json,request
def get_data():
    data=request.data
    if data:
        data=json.loads(data)
    else:
        data=request.form 
    return data